package com.nineclock.attendance.controller;

import com.nineclock.attendance.AttendPunchControllerApi;
import com.nineclock.attendance.dto.AttendPunchDTO;
import com.nineclock.attendance.service.AttendPunchService;
import com.nineclock.common.entity.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

public class AttendPunchController implements AttendPunchControllerApi {
    @Autowired
    AttendPunchService attendPunchService;
    @Override
    @PostMapping("/punch")
    public Result punch(@RequestBody AttendPunchDTO attendPunchDTO) {
        attendPunchService.addPunch(attendPunchDTO);
        return Result.success();
    }
}
